//
//  HXReachTableViewCell.m
//  KD
//
//  Created by ifly on 16/3/11.
//  Copyright © 2016年 Whx. All rights reserved.
//

#import "HXReachTableViewCell.h"

@interface HXReachTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *corpLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@end

@implementation HXReachTableViewCell

+(instancetype)cellWithTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath data:(HXReachListModel *)data
{
    UINib *nib = [UINib nibWithNibName:@"HXReachTableViewCell" bundle:nil];
    [tableView registerNib:nib forCellReuseIdentifier:@"HXReachTableViewCell"];
    HXReachTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HXReachTableViewCell" forIndexPath:indexPath];
    cell.corpLabel.text = data.MU_UserCorp;//企业
    if ([GlobalUtil isNilValue:data.SignUp_CheckDate]) {//是否签到
        cell.timeLabel.text = [NSString stringWithFormat:@"签到时间:未签到"];
    }else{
        cell.timeLabel.text = [NSString stringWithFormat:@"签到时间:%@",data.SignUp_CheckDate];
    }
    if ([GlobalUtil isNilValue:data.MU_ReplaceMan]) {//没有替换
        cell.nameLabel.text =[NSString stringWithFormat:@"会议人员:%@",data.MU_UserMan];
        cell.phoneLabel.text = [NSString stringWithFormat:@"联系方式:%@",data.MU_UserManTel];
    }else{//已经替换
        cell.nameLabel.text = [NSString stringWithFormat:@"会议人员:%@  替换人:%@",data.MU_UserMan,data.MU_ReplaceMan];
        cell.phoneLabel.text = [NSString stringWithFormat:@"替换人联系方式:%@",data.MU_ReplaceManTel];
    }
    return cell;
}

@end
